#include "login.h"
#include "ui_login.h"
#include "game.h"
#include<QPainter>
login::login(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::login)
{
    ui->setupUi(this);
}

login::~login()
{
    delete ui;
}


void login::on_pushButton_clicked()
{
    this->close();
    b=new Game;
    b->show();

}

void login::on_PushButton_clicked()
{
    this->close();
    b=new Game;
    b->show();
}
void login::paintEvent(QPaintEvent *event) {
  Q_UNUSED(event);

  QPainter painter(this);
  painter.drawPixmap(0,0,800,500,QPixmap(":/new/img/start.jpg"));//画背景



 // drawCharacter(painter);
 //drawObject(painter);
}
